<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>API 接口文档 | 道远路滑</title>
    <meta name="generator" content="VuePress 1.5.4">
    <link rel="icon" href="/vuepress-demo/favicon.ico">
    <link rel="stylesheet" href="/vuepress-demo/css/style">
    <meta name="description" content="Enjoy when you can, and endure when you must.">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
    <link rel="preload" href="/vuepress-demo/assets/css/0.styles.1157b0c6.css" as="style"><link rel="preload" href="/vuepress-demo/assets/js/app.46b6f644.js" as="script"><link rel="preload" href="/vuepress-demo/assets/js/3.426e1d24.js" as="script"><link rel="preload" href="/vuepress-demo/assets/js/1.bc0ebd1c.js" as="script"><link rel="preload" href="/vuepress-demo/assets/js/26.f517bc67.js" as="script"><link rel="prefetch" href="/vuepress-demo/assets/js/10.9b6c5d0e.js"><link rel="prefetch" href="/vuepress-demo/assets/js/11.165a010e.js"><link rel="prefetch" href="/vuepress-demo/assets/js/12.164bfb6f.js"><link rel="prefetch" href="/vuepress-demo/assets/js/13.6893165c.js"><link rel="prefetch" href="/vuepress-demo/assets/js/14.12443079.js"><link rel="prefetch" href="/vuepress-demo/assets/js/15.3e461aa7.js"><link rel="prefetch" href="/vuepress-demo/assets/js/16.1448f286.js"><link rel="prefetch" href="/vuepress-demo/assets/js/17.c47a5aed.js"><link rel="prefetch" href="/vuepress-demo/assets/js/18.e9b91ae8.js"><link rel="prefetch" href="/vuepress-demo/assets/js/19.9a11e20d.js"><link rel="prefetch" href="/vuepress-demo/assets/js/20.363b85fa.js"><link rel="prefetch" href="/vuepress-demo/assets/js/21.33f2355c.js"><link rel="prefetch" href="/vuepress-demo/assets/js/22.0e514f4b.js"><link rel="prefetch" href="/vuepress-demo/assets/js/23.e3d9935a.js"><link rel="prefetch" href="/vuepress-demo/assets/js/24.8e26ed5d.js"><link rel="prefetch" href="/vuepress-demo/assets/js/25.6d8d8f6e.js"><link rel="prefetch" href="/vuepress-demo/assets/js/27.2696e88e.js"><link rel="prefetch" href="/vuepress-demo/assets/js/28.77e0594c.js"><link rel="prefetch" href="/vuepress-demo/assets/js/29.820286ab.js"><link rel="prefetch" href="/vuepress-demo/assets/js/30.cafd3afa.js"><link rel="prefetch" href="/vuepress-demo/assets/js/31.69c0766a.js"><link rel="prefetch" href="/vuepress-demo/assets/js/32.b4ecb680.js"><link rel="prefetch" href="/vuepress-demo/assets/js/33.99f44edd.js"><link rel="prefetch" href="/vuepress-demo/assets/js/34.534856f6.js"><link rel="prefetch" href="/vuepress-demo/assets/js/4.1aaaa34b.js"><link rel="prefetch" href="/vuepress-demo/assets/js/5.c3df0076.js"><link rel="prefetch" href="/vuepress-demo/assets/js/6.8cda991c.js"><link rel="prefetch" href="/vuepress-demo/assets/js/7.dc87b874.js"><link rel="prefetch" href="/vuepress-demo/assets/js/8.4d9358c7.js"><link rel="prefetch" href="/vuepress-demo/assets/js/9.75571bbb.js">
    <link rel="stylesheet" href="/vuepress-demo/assets/css/0.styles.1157b0c6.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container no-sidebar" data-v-2d5f533b><div data-v-2d5f533b><div id="loader-wrapper" class="loading-wrapper" data-v-d48f4d20 data-v-2d5f533b data-v-2d5f533b><div class="loader-main" data-v-d48f4d20><div data-v-d48f4d20></div><div data-v-d48f4d20></div><div data-v-d48f4d20></div><div data-v-d48f4d20></div></div> <!----> <!----></div> <div class="password-shadow password-wrapper-out" style="display:none;" data-v-64685f0e data-v-2d5f533b data-v-2d5f533b><h3 class="title" style="display:none;" data-v-64685f0e data-v-64685f0e>道远路滑</h3> <!----> <label id="box" class="inputBox" style="display:none;" data-v-64685f0e data-v-64685f0e><input type="password" value="" data-v-64685f0e> <span data-v-64685f0e>Konck! Knock!</span> <button data-v-64685f0e>OK</button></label> <div class="footer" style="display:none;" data-v-64685f0e data-v-64685f0e><span data-v-64685f0e><i class="iconfont reco-theme" data-v-64685f0e></i> <a target="blank" href="https://vuepress-theme-reco.recoluan.com" data-v-64685f0e>vuePress-theme-reco</a></span> <span data-v-64685f0e><i class="iconfont reco-copyright" data-v-64685f0e></i> <a data-v-64685f0e><span data-v-64685f0e>HuFatFat</span>
            
          <span data-v-64685f0e>2017 - </span>
          2021
        </a></span></div></div> <div class="hide" data-v-2d5f533b><header class="navbar" data-v-2d5f533b><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/vuepress-demo/" class="home-link router-link-active"><!----> <span class="site-name">道远路滑</span></a> <div class="links"><div class="color-picker"><a class="color-button"><i class="iconfont reco-color"></i></a> <div class="color-picker-menu" style="display:none;"><div class="mode-options"><h4 class="title">Choose mode</h4> <ul class="color-mode-options"><li class="dark">dark</li><li class="auto active">auto</li><li class="light">light</li></ul></div></div></div> <div class="search-box"><i class="iconfont reco-search"></i> <input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/vuepress-demo/" class="nav-link"><i class="iconfont reco-home"></i>
  主页
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="iconfont reco-category"></i>
      分类
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/vuepress-demo/categories/CSS/" class="nav-link"><i class="iconfont undefined"></i>
  CSS
</a></li><li class="dropdown-item"><!----> <a href="/vuepress-demo/categories/HTML/" class="nav-link"><i class="iconfont undefined"></i>
  HTML
</a></li><li class="dropdown-item"><!----> <a href="/vuepress-demo/categories/JavaScript/" class="nav-link"><i class="iconfont undefined"></i>
  JavaScript
</a></li><li class="dropdown-item"><!----> <a href="/vuepress-demo/categories/Vue/" class="nav-link"><i class="iconfont undefined"></i>
  Vue
</a></li><li class="dropdown-item"><!----> <a href="/vuepress-demo/categories/Git/" class="nav-link"><i class="iconfont undefined"></i>
  Git
</a></li><li class="dropdown-item"><!----> <a href="/vuepress-demo/categories/vuepress/" class="nav-link"><i class="iconfont undefined"></i>
  vuepress
</a></li><li class="dropdown-item"><!----> <a href="/vuepress-demo/categories/jquery/" class="nav-link"><i class="iconfont undefined"></i>
  jquery
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="iconfont reco-api"></i>
      项目
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><h4>个人项目</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="http://hudapan.gitee.io/vue-background-management-system/#/login" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont undefined"></i>
  后台管理系统
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-subitem"><a href="http://hudapan.gitee.io/vue_music" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont undefined"></i>
  随机音乐播放
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li><li class="dropdown-item"><h4>美莱整形</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="http://wap.hnmylike.net/" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont undefined"></i>
  美莱整形移动端官网
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-subitem"><a href="http://www.hnmylike.cn/" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont undefined"></i>
  美莱整形电脑端官网
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-subitem"><a href="http://mmfzz.hnmylike.com/" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont undefined"></i>
  美莱植发移动端官网
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-subitem"><a href="http://mfzz.hnmylike.cn/" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont undefined"></i>
  美莱植发电脑端官网
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-subitem"><a href="http://tooth.hnmylike.com/" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont undefined"></i>
  美莱口腔电脑端官网
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li><li class="dropdown-item"><h4>房地产</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="http://www.51huizhou.com/" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont undefined"></i>
  深圳福缘地产
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-subitem"><a href="http://www.haofang11.com/" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont undefined"></i>
  惠州市粤港澳房地产
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-subitem"><a href="http://www.fangzizi.com/" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont undefined"></i>
  东莞市伊家美地产
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-subitem"><a href="http://www.fangzizi.com/huizong/demo.html" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont undefined"></i>
  房地产楼盘
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li></ul></div></div><div class="nav-item"><a href="/vuepress-demo/tag/" class="nav-link"><i class="iconfont reco-tag"></i>
  标签
</a></div><div class="nav-item"><a href="/vuepress-demo/timeline/" class="nav-link"><i class="iconfont reco-date"></i>
  时光轴
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="iconfont reco-lock"></i>
      关于
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/vuepress-demo/about/01.html" class="nav-link"><i class="iconfont undefined"></i>
  简介
</a></li><li class="dropdown-item"><!----> <a href="/vuepress-demo/about/02.html" class="nav-link"><i class="iconfont undefined"></i>
  履历
</a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask" data-v-2d5f533b></div> <aside class="sidebar" data-v-2d5f533b><div class="personal-info-wrapper" data-v-ca798c94 data-v-2d5f533b><img src="/vuepress-demo/avatar.png" alt="author-avatar" class="personal-img" data-v-ca798c94> <h3 class="name" data-v-ca798c94>
    HuFatFat
  </h3> <div class="num" data-v-ca798c94><div data-v-ca798c94><h3 data-v-ca798c94>14</h3> <h6 data-v-ca798c94>Article</h6></div> <div data-v-ca798c94><h3 data-v-ca798c94>9</h3> <h6 data-v-ca798c94>Tag</h6></div></div> <hr data-v-ca798c94></div> <nav class="nav-links"><div class="nav-item"><a href="/vuepress-demo/" class="nav-link"><i class="iconfont reco-home"></i>
  主页
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="iconfont reco-category"></i>
      分类
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/vuepress-demo/categories/CSS/" class="nav-link"><i class="iconfont undefined"></i>
  CSS
</a></li><li class="dropdown-item"><!----> <a href="/vuepress-demo/categories/HTML/" class="nav-link"><i class="iconfont undefined"></i>
  HTML
</a></li><li class="dropdown-item"><!----> <a href="/vuepress-demo/categories/JavaScript/" class="nav-link"><i class="iconfont undefined"></i>
  JavaScript
</a></li><li class="dropdown-item"><!----> <a href="/vuepress-demo/categories/Vue/" class="nav-link"><i class="iconfont undefined"></i>
  Vue
</a></li><li class="dropdown-item"><!----> <a href="/vuepress-demo/categories/Git/" class="nav-link"><i class="iconfont undefined"></i>
  Git
</a></li><li class="dropdown-item"><!----> <a href="/vuepress-demo/categories/vuepress/" class="nav-link"><i class="iconfont undefined"></i>
  vuepress
</a></li><li class="dropdown-item"><!----> <a href="/vuepress-demo/categories/jquery/" class="nav-link"><i class="iconfont undefined"></i>
  jquery
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="iconfont reco-api"></i>
      项目
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><h4>个人项目</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="http://hudapan.gitee.io/vue-background-management-system/#/login" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont undefined"></i>
  后台管理系统
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-subitem"><a href="http://hudapan.gitee.io/vue_music" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont undefined"></i>
  随机音乐播放
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li><li class="dropdown-item"><h4>美莱整形</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="http://wap.hnmylike.net/" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont undefined"></i>
  美莱整形移动端官网
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-subitem"><a href="http://www.hnmylike.cn/" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont undefined"></i>
  美莱整形电脑端官网
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-subitem"><a href="http://mmfzz.hnmylike.com/" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont undefined"></i>
  美莱植发移动端官网
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-subitem"><a href="http://mfzz.hnmylike.cn/" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont undefined"></i>
  美莱植发电脑端官网
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-subitem"><a href="http://tooth.hnmylike.com/" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont undefined"></i>
  美莱口腔电脑端官网
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li><li class="dropdown-item"><h4>房地产</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="http://www.51huizhou.com/" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont undefined"></i>
  深圳福缘地产
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-subitem"><a href="http://www.haofang11.com/" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont undefined"></i>
  惠州市粤港澳房地产
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-subitem"><a href="http://www.fangzizi.com/" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont undefined"></i>
  东莞市伊家美地产
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-subitem"><a href="http://www.fangzizi.com/huizong/demo.html" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont undefined"></i>
  房地产楼盘
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></li></ul></div></div><div class="nav-item"><a href="/vuepress-demo/tag/" class="nav-link"><i class="iconfont reco-tag"></i>
  标签
</a></div><div class="nav-item"><a href="/vuepress-demo/timeline/" class="nav-link"><i class="iconfont reco-date"></i>
  时光轴
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="iconfont reco-lock"></i>
      关于
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/vuepress-demo/about/01.html" class="nav-link"><i class="iconfont undefined"></i>
  简介
</a></li><li class="dropdown-item"><!----> <a href="/vuepress-demo/about/02.html" class="nav-link"><i class="iconfont undefined"></i>
  履历
</a></li></ul></div></div> <!----></nav> <!----> </aside> <div class="password-shadow password-wrapper-in" style="display:none;" data-v-64685f0e data-v-2d5f533b><h3 class="title" style="display:none;" data-v-64685f0e data-v-64685f0e>API 接口文档</h3> <!----> <label id="box" class="inputBox" style="display:none;" data-v-64685f0e data-v-64685f0e><input type="password" value="" data-v-64685f0e> <span data-v-64685f0e>Konck! Knock!</span> <button data-v-64685f0e>OK</button></label> <div class="footer" style="display:none;" data-v-64685f0e data-v-64685f0e><span data-v-64685f0e><i class="iconfont reco-theme" data-v-64685f0e></i> <a target="blank" href="https://vuepress-theme-reco.recoluan.com" data-v-64685f0e>vuePress-theme-reco</a></span> <span data-v-64685f0e><i class="iconfont reco-copyright" data-v-64685f0e></i> <a data-v-64685f0e><span data-v-64685f0e>HuFatFat</span>
            
          <span data-v-64685f0e>2017 - </span>
          2021
        </a></span></div></div> <div data-v-2d5f533b><main class="page"><div class="page-title" style="display:none;"><h1 class="title">API 接口文档</h1> <div data-v-3b7f5bdf><i class="iconfont reco-account" data-v-3b7f5bdf><span data-v-3b7f5bdf>HuFatFat</span></i> <i class="iconfont reco-date" data-v-3b7f5bdf><span data-v-3b7f5bdf>2021-01-20</span></i> <!----> <i class="iconfont reco-tag tags" data-v-3b7f5bdf><span class="tag-item" data-v-3b7f5bdf>Vue</span></i></div></div> <div class="theme-reco-content content__default" style="display:none;"><h2 id=""><a href="#" class="header-anchor">#</a></h2> <h1 id="_1-电商管理后台-api-接口文档"><a href="#_1-电商管理后台-api-接口文档" class="header-anchor">#</a> 1. 电商管理后台 API 接口文档</h1> <h2 id="_1-1-api-v1-接口说明"><a href="#_1-1-api-v1-接口说明" class="header-anchor">#</a> 1.1. API V1 接口说明</h2> <ul><li>接口基准地址：<code>http://127.0.0.1:8888/api/private/v1/</code></li> <li>服务端已开启 CORS 跨域支持</li> <li>API V1 认证统一使用 Token 认证</li> <li>需要授权的 API ，必须在请求头中使用 <code>Authorization</code> 字段提供 <code>token</code> 令牌</li> <li>使用 HTTP Status Code 标识状态</li> <li>数据返回格式统一使用 JSON</li></ul> <h3 id="_1-1-1-支持的请求方法"><a href="#_1-1-1-支持的请求方法" class="header-anchor">#</a> 1.1.1. 支持的请求方法</h3> <ul><li>GET（SELECT）：从服务器取出资源（一项或多项）。</li> <li>POST（CREATE）：在服务器新建一个资源。</li> <li>PUT（UPDATE）：在服务器更新资源（客户端提供改变后的完整资源）。</li> <li>PATCH（UPDATE）：在服务器更新资源（客户端提供改变的属性）。</li> <li>DELETE（DELETE）：从服务器删除资源。</li> <li>HEAD：获取资源的元数据。</li> <li>OPTIONS：获取信息，关于资源的哪些属性是客户端可以改变的。</li></ul> <h3 id="_1-1-2-通用返回状态说明"><a href="#_1-1-2-通用返回状态说明" class="header-anchor">#</a> 1.1.2. 通用返回状态说明</h3> <table><thead><tr><th><em>状态码</em></th> <th><em>含义</em></th> <th><em>说明</em></th></tr></thead> <tbody><tr><td>200</td> <td>OK</td> <td>请求成功</td></tr> <tr><td>201</td> <td>CREATED</td> <td>创建成功</td></tr> <tr><td>204</td> <td>DELETED</td> <td>删除成功</td></tr> <tr><td>400</td> <td>BAD REQUEST</td> <td>请求的地址不存在或者包含不支持的参数</td></tr> <tr><td>401</td> <td>UNAUTHORIZED</td> <td>未授权</td></tr> <tr><td>403</td> <td>FORBIDDEN</td> <td>被禁止访问</td></tr> <tr><td>404</td> <td>NOT FOUND</td> <td>请求的资源不存在</td></tr> <tr><td>422</td> <td>Unprocesable entity</td> <td>[POST/PUT/PATCH] 当创建一个对象时，发生一个验证错误</td></tr> <tr><td>500</td> <td>INTERNAL SERVER ERROR</td> <td>内部错误</td></tr> <tr><td></td> <td></td> <td></td></tr></tbody></table> <hr> <h2 id="_1-2-登录"><a href="#_1-2-登录" class="header-anchor">#</a> 1.2. 登录</h2> <h3 id="_1-2-1-登录验证接口"><a href="#_1-2-1-登录验证接口" class="header-anchor">#</a> 1.2.1. 登录验证接口</h3> <ul><li>请求路径：login</li> <li>请求方法：post</li> <li>请求参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>username</td> <td>用户名</td> <td>不能为空</td></tr> <tr><td>password</td> <td>密码</td> <td>不能为空</td></tr></tbody></table> <ul><li>响应参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>id</td> <td>用户 ID</td> <td></td></tr> <tr><td>rid</td> <td>用户角色 ID</td> <td></td></tr> <tr><td>username</td> <td>用户名</td> <td></td></tr> <tr><td>mobile</td> <td>手机号</td> <td></td></tr> <tr><td>email</td> <td>邮箱</td> <td></td></tr> <tr><td>token</td> <td>令牌</td> <td>基于 jwt 的令牌</td></tr></tbody></table> <ul><li>响应数据</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>{
    &quot;data&quot;: {
        &quot;id&quot;: 500,
        &quot;rid&quot;: 0,
        &quot;username&quot;: &quot;admin&quot;,
        &quot;mobile&quot;: &quot;123&quot;,
        &quot;email&quot;: &quot;123@qq.com&quot;,
        &quot;token&quot;: &quot;Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjUwMCwicmlkIjowLCJpYXQiOjE1MTI1NDQyOTksImV4cCI6MTUxMjYzMDY5OX0.eGrsrvwHm-tPsO9r_pxHIQ5i5L1kX9RX444uwnRGaIM&quot;
    },
    &quot;meta&quot;: {
        &quot;msg&quot;: &quot;登录成功&quot;,
        &quot;status&quot;: 200
    }
}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br></div></div><h2 id="_1-3-用户管理"><a href="#_1-3-用户管理" class="header-anchor">#</a> 1.3. 用户管理</h2> <h3 id="_1-3-1-用户数据列表"><a href="#_1-3-1-用户数据列表" class="header-anchor">#</a> 1.3.1. 用户数据列表</h3> <ul><li>请求路径：users</li> <li>请求方法：get</li> <li>请求参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>query</td> <td>查询参数</td> <td>可以为空</td></tr> <tr><td>pagenum</td> <td>当前页码</td> <td>不能为空</td></tr> <tr><td>pagesize</td> <td>每页显示条数</td> <td>不能为空</td></tr></tbody></table> <ul><li>响应参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>totalpage</td> <td>总记录数</td> <td></td></tr> <tr><td>pagenum</td> <td>当前页码</td> <td></td></tr> <tr><td>users</td> <td>用户数据集合</td> <td></td></tr></tbody></table> <ul><li>响应数据</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>{
    &quot;data&quot;: {
        &quot;totalpage&quot;: 5,
        &quot;pagenum&quot;: 4,
        &quot;users&quot;: [
            {
                &quot;id&quot;: 25,
                &quot;username&quot;: &quot;tige117&quot;,
                &quot;mobile&quot;: &quot;18616358651&quot;,
                &quot;type&quot;: 1,
                &quot;email&quot;: &quot;tige112@163.com&quot;,
                &quot;create_time&quot;: &quot;2017-11-09T20:36:26.000Z&quot;,
                &quot;mg_state&quot;: true, // 当前用户的状态
                &quot;role_name&quot;: &quot;炒鸡管理员&quot;
            }
        ]
    },
    &quot;meta&quot;: {
        &quot;msg&quot;: &quot;获取成功&quot;,
        &quot;status&quot;: 200
    }
}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br></div></div><h3 id="_1-3-2-添加用户"><a href="#_1-3-2-添加用户" class="header-anchor">#</a> 1.3.2. 添加用户</h3> <ul><li>请求路径：users</li> <li>请求方法：post</li> <li>请求参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>username</td> <td>用户名称</td> <td>不能为空</td></tr> <tr><td>password</td> <td>用户密码</td> <td>不能为空</td></tr> <tr><td>email</td> <td>邮箱</td> <td>可以为空</td></tr> <tr><td>mobile</td> <td>手机号</td> <td>可以为空</td></tr></tbody></table> <ul><li>响应参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>id</td> <td>用户 ID</td> <td></td></tr> <tr><td>rid</td> <td>用户角色 ID</td> <td></td></tr> <tr><td>username</td> <td>用户名</td> <td></td></tr> <tr><td>mobile</td> <td>手机号</td> <td></td></tr> <tr><td>email</td> <td>邮箱</td> <td></td></tr></tbody></table> <ul><li>响应数据</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>{
    &quot;data&quot;: {
        &quot;id&quot;: 28,
        &quot;username&quot;: &quot;tige1200&quot;,
        &quot;mobile&quot;: &quot;test&quot;,
        &quot;type&quot;: 1,
        &quot;openid&quot;: &quot;&quot;,
        &quot;email&quot;: &quot;test@test.com&quot;,
        &quot;create_time&quot;: &quot;2017-11-10T03:47:13.533Z&quot;,
        &quot;modify_time&quot;: null,
        &quot;is_delete&quot;: false,
        &quot;is_active&quot;: false
    },
    &quot;meta&quot;: {
        &quot;msg&quot;: &quot;用户创建成功&quot;,
        &quot;status&quot;: 201
    }
}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br></div></div><h3 id="_1-3-3-修改用户状态"><a href="#_1-3-3-修改用户状态" class="header-anchor">#</a> 1.3.3. 修改用户状态</h3> <ul><li>请求路径：users/:uId/state/:type</li> <li>请求方法：put</li> <li>请求参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>uId</td> <td>用户 ID</td> <td>不能为空<code>携带在url中</code></td></tr> <tr><td>type</td> <td>用户状态</td> <td>不能为空<code>携带在url中</code>，值为 true 或者 false</td></tr></tbody></table> <ul><li>响应数据</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>{
  &quot;data&quot;: {
    &quot;id&quot;: 566,
    &quot;rid&quot;: 30,
    &quot;username&quot;: &quot;admin&quot;,
    &quot;mobile&quot;: &quot;123456&quot;,
    &quot;email&quot;: &quot;bb@itcast.com&quot;,
    &quot;mg_state&quot;: 0
  },
  &quot;meta&quot;: {
    &quot;msg&quot;: &quot;设置状态成功&quot;,
    &quot;status&quot;: 200
  }
}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br></div></div><h3 id="_1-3-4-根据-id-查询用户信息"><a href="#_1-3-4-根据-id-查询用户信息" class="header-anchor">#</a> 1.3.4. 根据 ID 查询用户信息</h3> <ul><li>请求路径：users/:id</li> <li>请求方法：get</li> <li>请求参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>id</td> <td>用户 ID</td> <td>不能为空<code>携带在url中</code></td></tr></tbody></table> <ul><li>响应参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>id</td> <td>用户 ID</td> <td></td></tr> <tr><td>role_id</td> <td>角色 ID</td> <td></td></tr> <tr><td>mobile</td> <td>手机号</td> <td></td></tr> <tr><td>email</td> <td>邮箱</td> <td></td></tr></tbody></table> <ul><li>响应数据</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>{
    &quot;data&quot;: {
        &quot;id&quot;: 503,
        &quot;username&quot;: &quot;admin3&quot;,
        &quot;role_id&quot;: 0,
        &quot;mobile&quot;: &quot;00000&quot;,
        &quot;email&quot;: &quot;new@new.com&quot;
    },
    &quot;meta&quot;: {
        &quot;msg&quot;: &quot;查询成功&quot;,
        &quot;status&quot;: 200
    }
}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br></div></div><h3 id="_1-3-5-编辑用户提交"><a href="#_1-3-5-编辑用户提交" class="header-anchor">#</a> 1.3.5. 编辑用户提交</h3> <ul><li>请求路径：users/:id</li> <li>请求方法：put</li> <li>请求参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>id</td> <td>用户 id</td> <td>不能为空 <code>参数是url参数:id</code></td></tr> <tr><td>email</td> <td>邮箱</td> <td>可以为空</td></tr> <tr><td>mobile</td> <td>手机号</td> <td>可以为空</td></tr></tbody></table> <ul><li>响应参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>id</td> <td>用户 ID</td> <td></td></tr> <tr><td>role_id</td> <td>角色 ID</td> <td></td></tr> <tr><td>mobile</td> <td>手机号</td> <td></td></tr> <tr><td>email</td> <td>邮箱</td> <td></td></tr></tbody></table> <ul><li>响应数据</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>/* 200表示成功，500表示失败 */
{
    &quot;data&quot;: {
        &quot;id&quot;: 503,
        &quot;username&quot;: &quot;admin3&quot;,
        &quot;role_id&quot;: 0,
        &quot;mobile&quot;: &quot;111&quot;,
        &quot;email&quot;: &quot;123@123.com&quot;
    },
    &quot;meta&quot;: {
        &quot;msg&quot;: &quot;更新成功&quot;,
        &quot;status&quot;: 200
    }
}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br></div></div><h3 id="_1-3-6-删除单个用户"><a href="#_1-3-6-删除单个用户" class="header-anchor">#</a> 1.3.6. 删除单个用户</h3> <ul><li>请求路径：users/:id</li> <li>请求方法：delete</li> <li>请求参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>id</td> <td>用户 id</td> <td>不能为空<code>参数是url参数:id</code></td></tr></tbody></table> <ul><li>响应参数</li> <li>响应数据</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>{
    &quot;data&quot;: null,
    &quot;meta&quot;: {
        &quot;msg&quot;: &quot;删除成功&quot;,
        &quot;status&quot;: 200
    }
}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br></div></div><h3 id="_1-3-7-分配用户角色"><a href="#_1-3-7-分配用户角色" class="header-anchor">#</a> 1.3.7. 分配用户角色</h3> <ul><li>请求路径：users/:id/role</li> <li>请求方法：put</li> <li>请求参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>id</td> <td>用户 ID</td> <td>不能为空<code>参数是url参数:id</code></td></tr> <tr><td>rid</td> <td>角色 id</td> <td>不能为空<code>参数body参数</code></td></tr></tbody></table> <ul><li>响应参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>id</td> <td>用户 ID</td> <td></td></tr> <tr><td>role_id</td> <td>角色 ID</td> <td></td></tr> <tr><td>mobile</td> <td>手机号</td> <td></td></tr> <tr><td>email</td> <td>邮箱</td> <td></td></tr></tbody></table> <ul><li>响应数据</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>{
    &quot;data&quot;: {
        &quot;id&quot;: 508,
        &quot;rid&quot;: &quot;30&quot;,
        &quot;username&quot;: &quot;asdf1&quot;,
        &quot;mobile&quot;: &quot;123123&quot;,
        &quot;email&quot;: &quot;adfsa@qq.com&quot;
    },
    &quot;meta&quot;: {
        &quot;msg&quot;: &quot;设置角色成功&quot;,
        &quot;status&quot;: 200
    }
}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br></div></div><h2 id="_1-4-权限管理"><a href="#_1-4-权限管理" class="header-anchor">#</a> 1.4. 权限管理</h2> <h3 id="_1-4-1-所有权限列表"><a href="#_1-4-1-所有权限列表" class="header-anchor">#</a> 1.4.1. 所有权限列表</h3> <ul><li>请求路径：rights/:type</li> <li>请求方法：get</li> <li>请求参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>type</td> <td>类型</td> <td>值 list 或 tree , list 列表显示权限, tree 树状显示权限,<code>参数是url参数:type</code></td></tr></tbody></table> <ul><li>响应参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>id</td> <td>权限 ID</td> <td></td></tr> <tr><td>authName</td> <td>权限说明</td> <td></td></tr> <tr><td>level</td> <td>权限层级</td> <td></td></tr> <tr><td>pid</td> <td>权限父 ID</td> <td></td></tr> <tr><td>path</td> <td>对应访问路径</td> <td></td></tr></tbody></table> <ul><li>响应数据 type=list</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>  {
    &quot;data&quot;: [
        {
            &quot;id&quot;: 101,
            &quot;authName&quot;: &quot;商品管理&quot;,
            &quot;level&quot;: &quot;0&quot;,
            &quot;pid&quot;: 0,
            &quot;path&quot;: null
        },
        {
            &quot;id&quot;: 102,
            &quot;authName&quot;: &quot;订单管理&quot;,
            &quot;level&quot;: &quot;0&quot;,
            &quot;pid&quot;: 0,
            &quot;path&quot;: null
        }
    ],
    &quot;meta&quot;: {
        &quot;msg&quot;: &quot;获取权限列表成功&quot;,
        &quot;status&quot;: 200
    }
}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br></div></div><p>type=tree</p> <div class="language- line-numbers-mode"><pre class="language-text"><code>  {
    data: [
      {
        id: 101,
        authName: '商品管理',
        path: null,
        pid: 0,
        children: [
          {
            id: 104,
            authName: '商品列表',
            path: null,
            pid: 101,
            children: [
              {
                id: 105,
                authName: '添加商品',
                path: null,
                pid: '104,101'
              }
            ]
          }
        ]
      }
    ],
    meta: {
      msg: '获取权限列表成功',
      status: 200
    }
  }
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br></div></div><h3 id="_1-4-2-左侧菜单权限"><a href="#_1-4-2-左侧菜单权限" class="header-anchor">#</a> 1.4.2. 左侧菜单权限</h3> <ul><li>请求路径：menus</li> <li>请求方法：get</li> <li>响应数据</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>{
    &quot;data&quot;:
        {
            &quot;id&quot;: 101,
            &quot;authName&quot;: &quot;商品管理&quot;,
            &quot;path&quot;: null,
            &quot;children&quot;: [
                {
                    &quot;id&quot;: 104,
                    &quot;authName&quot;: &quot;商品列表&quot;,
                    &quot;path&quot;: null,
                    &quot;children&quot;: []
                }
            ]
        }
    &quot;meta&quot;: {
        &quot;msg&quot;: &quot;获取菜单列表成功&quot;,
        &quot;status&quot;: 200
    }
}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br></div></div><h2 id="_1-5-角色管理"><a href="#_1-5-角色管理" class="header-anchor">#</a> 1.5. 角色管理</h2> <h3 id="_1-5-1-角色列表"><a href="#_1-5-1-角色列表" class="header-anchor">#</a> 1.5.1. 角色列表</h3> <ul><li><p>请求路径：roles</p></li> <li><p>请求方法：get</p></li> <li><p>响应数据说明</p> <ul><li><p>第一层为角色信息</p></li> <li><p>第二层开始为权限说明，权限一共有 3 层权限</p></li> <li><p>最后一层权限，不包含 <code>children</code> 属性</p></li></ul></li> <li><p>响应数据</p></li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>{
    &quot;data&quot;: [
        {
            &quot;id&quot;: 30,
            &quot;roleName&quot;: &quot;主管&quot;,
            &quot;roleDesc&quot;: &quot;技术负责人&quot;,
            &quot;children&quot;: [
                {
                    &quot;id&quot;: 101,
                    &quot;authName&quot;: &quot;商品管理&quot;,
                    &quot;path&quot;: null,
                    &quot;children&quot;: [
                        {
                            &quot;id&quot;: 104,
                            &quot;authName&quot;: &quot;商品列表&quot;,
                            &quot;path&quot;: null,
                            &quot;children&quot;: [
                                {
                                    &quot;id&quot;: 105,
                                    &quot;authName&quot;: &quot;添加商品&quot;,
                                    &quot;path&quot;: null
                                }
                            ]
                        }
                    ]
                }
            ]
        }
    ],
    &quot;meta&quot;: {
        &quot;msg&quot;: &quot;获取成功&quot;,
        &quot;status&quot;: 200
    }
}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br><span class="line-number">31</span><br><span class="line-number">32</span><br><span class="line-number">33</span><br><span class="line-number">34</span><br></div></div><h3 id="_1-5-2-添加角色"><a href="#_1-5-2-添加角色" class="header-anchor">#</a> 1.5.2. 添加角色</h3> <ul><li>请求路径：roles</li> <li>请求方法：post</li> <li>请求参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>roleName</td> <td>角色名称</td> <td>不能为空</td></tr> <tr><td>roleDesc</td> <td>角色描述</td> <td>可以为空</td></tr></tbody></table> <ul><li>响应参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>roleId</td> <td>角色 ID</td> <td></td></tr> <tr><td>roleName</td> <td>角色名称</td> <td></td></tr> <tr><td>roleDesc</td> <td>角色描述</td> <td></td></tr></tbody></table> <ul><li>响应数据</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>{
    &quot;data&quot;: {
        &quot;roleId&quot;: 40,
        &quot;roleName&quot;: &quot;admin2&quot;,
        &quot;roleDesc&quot;: &quot;admin2Desc&quot;
    },
    &quot;meta&quot;: {
        &quot;msg&quot;: &quot;创建成功&quot;,
        &quot;status&quot;: 201
    }
}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br></div></div><h3 id="_1-5-3-根据-id-查询角色"><a href="#_1-5-3-根据-id-查询角色" class="header-anchor">#</a> 1.5.3. 根据 ID 查询角色</h3> <ul><li>请求路径：roles/:id</li> <li>请求方法：get</li> <li>请求参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>:id</td> <td>角色 ID</td> <td>不能为空<code>携带在url中</code></td></tr></tbody></table> <ul><li>响应参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>roleId</td> <td>角色 ID</td> <td></td></tr> <tr><td>roleName</td> <td>角色名称</td> <td></td></tr> <tr><td>roleDesc</td> <td>角色描述</td> <td></td></tr></tbody></table> <ul><li>响应数据</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>{
    &quot;data&quot;: {
        &quot;roleId&quot;: 31,
        &quot;roleName&quot;: &quot;测试角色&quot;,
        &quot;roleDesc&quot;: &quot;测试负责人&quot;
    },
    &quot;meta&quot;: {
        &quot;msg&quot;: &quot;获取成功&quot;,
        &quot;status&quot;: 200
    }
}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br></div></div><h3 id="_1-5-4-编辑提交角色"><a href="#_1-5-4-编辑提交角色" class="header-anchor">#</a> 1.5.4. 编辑提交角色</h3> <ul><li>请求路径：roles/:id</li> <li>请求方法：put</li> <li>请求参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>:id</td> <td>角色 ID</td> <td>不能为空<code>携带在url中</code></td></tr> <tr><td>roleName</td> <td>角色名称</td> <td>不能为空</td></tr> <tr><td>roleDesc</td> <td>角色描述</td> <td>可以为空</td></tr></tbody></table> <ul><li>响应数据</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>{
    &quot;data&quot;: {
        &quot;roleId&quot;: 31,
        &quot;roleName&quot;: &quot;测试角色&quot;,
        &quot;roleDesc&quot;: &quot;测试角色描述&quot;
    },
    &quot;meta&quot;: {
        &quot;msg&quot;: &quot;获取成功&quot;,
        &quot;status&quot;: 200
    }
}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br></div></div><h3 id="_1-5-5-删除角色"><a href="#_1-5-5-删除角色" class="header-anchor">#</a> 1.5.5. 删除角色</h3> <ul><li>请求路径：roles/:id</li> <li>请求方法：delete</li> <li>请求参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>:id</td> <td>角色 ID</td> <td>不能为空<code>携带在url中</code></td></tr></tbody></table> <ul><li>响应数据</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>{
    &quot;data&quot;: null,
    &quot;meta&quot;: {
        &quot;msg&quot;: &quot;删除成功&quot;,
        &quot;status&quot;: 200
    }
}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br></div></div><h3 id="_1-5-6-角色授权"><a href="#_1-5-6-角色授权" class="header-anchor">#</a> 1.5.6. 角色授权</h3> <ul><li>请求路径：roles/:roleId/rights</li> <li>请求方法：post</li> <li>请求参数：通过 <code>请求体</code> 发送给后端</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>:roleId</td> <td>角色 ID</td> <td>不能为空<code>携带在url中</code></td></tr> <tr><td>rids</td> <td>权限 ID 列表（字符串）</td> <td>以 <code>,</code> 分割的权限 ID 列表（获取所有被选中、叶子节点的key和半选中节点的key, 包括 1，2，3级节点）</td></tr></tbody></table> <ul><li>响应数据</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>{
    &quot;data&quot;: null,
    &quot;meta&quot;: {
        &quot;msg&quot;: &quot;更新成功&quot;,
        &quot;status&quot;: 200
    }
}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br></div></div><h3 id="_1-5-7-删除角色指定权限"><a href="#_1-5-7-删除角色指定权限" class="header-anchor">#</a> 1.5.7. 删除角色指定权限</h3> <ul><li><p>请求路径：roles/:roleId/rights/:rightId</p></li> <li><p>请求方法：delete</p></li> <li><p>请求参数</p> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>:roleId</td> <td>角色 ID</td> <td>不能为空<code>携带在url中</code></td></tr> <tr><td>:rightId</td> <td>权限 ID</td> <td>不能为空<code>携带在url中</code></td></tr></tbody></table></li> <li><p>响应数据说明</p> <ul><li>返回的data, 是当前角色下最新的权限数据</li></ul></li> <li><p>响应数据</p> <div class="language- line-numbers-mode"><pre class="language-text"><code>{
    &quot;data&quot;: [
        {
            &quot;id&quot;: 101,
            &quot;authName&quot;: &quot;商品管理&quot;,
            &quot;path&quot;: null,
            &quot;children&quot;: [
                {
                    &quot;id&quot;: 104,
                    &quot;authName&quot;: &quot;商品列表&quot;,
                    &quot;path&quot;: null,
                    &quot;children&quot;: [
                        {
                            &quot;id&quot;: 105,
                            &quot;authName&quot;: &quot;添加商品&quot;,
                            &quot;path&quot;: null
                        },
                        {
                            &quot;id&quot;: 116,
                            &quot;authName&quot;: &quot;修改&quot;,
                            &quot;path&quot;: null
                        }
                    ]
                }
            ]
        }
    ],
    &quot;meta&quot;: {
        &quot;msg&quot;: &quot;取消权限成功&quot;,
        &quot;status&quot;: 200
    }
}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br><span class="line-number">31</span><br><span class="line-number">32</span><br></div></div></li></ul> <h2 id="_1-6-商品分类管理"><a href="#_1-6-商品分类管理" class="header-anchor">#</a> 1.6. 商品分类管理</h2> <h3 id="_1-6-1-商品分类数据列表"><a href="#_1-6-1-商品分类数据列表" class="header-anchor">#</a> 1.6.1. 商品分类数据列表</h3> <ul><li>请求路径：categories</li> <li>请求方法：get</li> <li>请求参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>type</td> <td>[1,2,3]</td> <td>值：1，2，3 分别表示显示一层二层三层分类列表 【可选参数】如果不传递，则默认获取所有级别的分类</td></tr> <tr><td>pagenum</td> <td>当前页码值</td> <td>【可选参数】如果不传递，则默认获取所有分类</td></tr> <tr><td>pagesize</td> <td>每页显示多少条数据</td> <td>【可选参数】如果不传递，则默认获取所有分类</td></tr></tbody></table> <ul><li>响应参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>cat_id</td> <td>分类 ID</td> <td></td></tr> <tr><td>cat_name</td> <td>分类名称</td> <td></td></tr> <tr><td>cat_pid</td> <td>分类父 ID</td> <td></td></tr> <tr><td>cat_level</td> <td>分类当前层级</td> <td></td></tr></tbody></table> <ul><li>响应数据</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>{
    &quot;data&quot;: [
        {
            &quot;cat_id&quot;: 1,
            &quot;cat_name&quot;: &quot;大家电&quot;,
            &quot;cat_pid&quot;: 0,
            &quot;cat_level&quot;: 0,
            &quot;cat_deleted&quot;: false,
            &quot;children&quot;: [
                {
                    &quot;cat_id&quot;: 3,
                    &quot;cat_name&quot;: &quot;电视&quot;,
                    &quot;cat_pid&quot;: 1,
                    &quot;cat_level&quot;: 1,
                    &quot;cat_deleted&quot;: false,
                    &quot;children&quot;: [
                        {
                            &quot;cat_id&quot;: 6,
                            &quot;cat_name&quot;: &quot;曲面电视&quot;,
                            &quot;cat_pid&quot;: 3,
                            &quot;cat_level&quot;: 2,
                            &quot;cat_deleted&quot;: false
                        },
                        {
                            &quot;cat_id&quot;: 7,
                            &quot;cat_name&quot;: &quot;海信&quot;,
                            &quot;cat_pid&quot;: 3,
                            &quot;cat_level&quot;: 2,
                            &quot;cat_deleted&quot;: false
                        }
                    ]
                }
            ]
        }
    ],
    &quot;meta&quot;: {
        &quot;msg&quot;: &quot;获取成功&quot;,
        &quot;status&quot;: 200
    }
}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br><span class="line-number">31</span><br><span class="line-number">32</span><br><span class="line-number">33</span><br><span class="line-number">34</span><br><span class="line-number">35</span><br><span class="line-number">36</span><br><span class="line-number">37</span><br><span class="line-number">38</span><br><span class="line-number">39</span><br><span class="line-number">40</span><br></div></div><h3 id="_1-6-2-添加分类"><a href="#_1-6-2-添加分类" class="header-anchor">#</a> 1.6.2. 添加分类</h3> <ul><li>请求路径：categories</li> <li>请求方法：post</li> <li>请求参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>cat_pid</td> <td>分类父 ID</td> <td>不能为空，如果要添加1级分类，则父分类Id应该设置为 <code>0</code></td></tr> <tr><td>cat_name</td> <td>分类名称</td> <td>不能为空</td></tr> <tr><td>cat_level</td> <td>分类层级</td> <td>不能为空，<code>0</code>表示一级分类；<code>1</code>表示二级分类；<code>2</code>表示三级分类</td></tr></tbody></table> <ul><li>响应数据</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>{
    &quot;data&quot;: {
        &quot;cat_id&quot;: 62,
        &quot;cat_name&quot;: &quot;相框&quot;,
        &quot;cat_pid&quot;: &quot;1&quot;,
        &quot;cat_level&quot;: &quot;1&quot;
    },
    &quot;meta&quot;: {
        &quot;msg&quot;: &quot;创建成功&quot;,
        &quot;status&quot;: 201
    }
}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br></div></div><h3 id="_1-6-3-根据-id-查询分类"><a href="#_1-6-3-根据-id-查询分类" class="header-anchor">#</a> 1.6.3. 根据 id 查询分类</h3> <ul><li>请求路径：categories/:id</li> <li>请求方法：get</li> <li>请求参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>:id</td> <td>分类 ID</td> <td>不能为空<code>携带在url中</code></td></tr></tbody></table> <ul><li>响应数据</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>{
    &quot;data&quot;: {
        &quot;cat_id&quot;: 3,
        &quot;cat_name&quot;: &quot;厨卫电器&quot;,
        &quot;cat_pid&quot;: 0,
        &quot;cat_level&quot;: 0
    },
    &quot;meta&quot;: {
        &quot;msg&quot;: &quot;获取成功&quot;,
        &quot;status&quot;: 200
    }
}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br></div></div><h3 id="_1-6-4-编辑提交分类"><a href="#_1-6-4-编辑提交分类" class="header-anchor">#</a> 1.6.4. 编辑提交分类</h3> <ul><li>请求路径：categories/:id</li> <li>请求方法：put</li> <li>请求参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>:id</td> <td>分类 ID</td> <td>不能为空<code>携带在url中</code></td></tr> <tr><td>cat_name</td> <td>分类名称</td> <td>不能为空【此参数，放到请求体中】</td></tr></tbody></table> <ul><li>响应数据</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>{
    &quot;data&quot;: {
        &quot;cat_id&quot;: 22,
        &quot;cat_name&quot;: &quot;自拍杆&quot;,
        &quot;cat_pid&quot;: 7,
        &quot;cat_level&quot;: 2
    },
    &quot;meta&quot;: {
        &quot;msg&quot;: &quot;更新成功&quot;,
        &quot;status&quot;: 200
    }
}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br></div></div><h3 id="_1-6-5-删除分类"><a href="#_1-6-5-删除分类" class="header-anchor">#</a> 1.6.5. 删除分类</h3> <ul><li>请求路径：categories/:id</li> <li>请求方法：delete</li> <li>请求参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>:id</td> <td>分类 ID</td> <td>不能为空<code>携带在url中</code></td></tr></tbody></table> <ul><li>响应数据</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>{
    &quot;data&quot;: null,
    &quot;meta&quot;: {
        &quot;msg&quot;: &quot;删除成功&quot;,
        &quot;status&quot;: 200
    }
}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br></div></div><h2 id="_1-7-分类参数管理"><a href="#_1-7-分类参数管理" class="header-anchor">#</a> 1.7. 分类参数管理</h2> <h3 id="_1-7-1-参数列表"><a href="#_1-7-1-参数列表" class="header-anchor">#</a> 1.7.1. 参数列表</h3> <ul><li>请求路径：categories/:id/attributes</li> <li>请求方法：get</li> <li>请求参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>:id</td> <td>分类 ID</td> <td>不能为空<code>携带在url中</code></td></tr> <tr><td>sel</td> <td>[only,many]</td> <td>不能为空,通过 only 或 many 来获取分类静态参数还是动态参数</td></tr></tbody></table> <ul><li>响应参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>attr_id</td> <td>分类参数 ID</td> <td></td></tr> <tr><td>attr_name</td> <td>分类参数名称</td> <td></td></tr> <tr><td>cat_id</td> <td>分类参数所属分类</td> <td></td></tr> <tr><td>attr_sel</td> <td>only:输入框(唯一) many:后台下拉列表/前台单选框</td> <td></td></tr> <tr><td>attr_write</td> <td>manual:手工录入 list:从列表选择</td> <td></td></tr> <tr><td>attr_vals</td> <td>如果 attr_write:list,那么有值，该值以逗号分隔</td> <td></td></tr></tbody></table> <ul><li>响应数据</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>{
    &quot;data&quot;: [
        {
            &quot;attr_id&quot;: 1,
            &quot;attr_name&quot;: &quot;cpu&quot;,
            &quot;cat_id&quot;: 22,
            &quot;attr_sel&quot;: &quot;only&quot;,
            &quot;attr_write&quot;: &quot;manual&quot;,
            &quot;attr_vals&quot;: &quot;ffff&quot;
        }
    ],
    &quot;meta&quot;: {
        &quot;msg&quot;: &quot;获取成功&quot;,
        &quot;status&quot;: 200
    }
}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br></div></div><h3 id="_1-7-2-添加动态参数或者静态属性"><a href="#_1-7-2-添加动态参数或者静态属性" class="header-anchor">#</a> 1.7.2. 添加动态参数或者静态属性</h3> <ul><li>请求路径：categories/:id/attributes</li> <li>请求方法：post</li> <li>请求参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>:id</td> <td>分类 ID</td> <td>不能为空<code>携带在url中</code></td></tr> <tr><td>attr_name</td> <td>参数名称</td> <td>不能为空</td></tr> <tr><td>attr_sel</td> <td>[only,many]</td> <td>不能为空</td></tr> <tr><td>attr_vals</td> <td>如果是 many 就需要填写值的选项，以逗号分隔</td> <td>【可选参数】</td></tr></tbody></table> <ul><li>响应数据</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>{
    &quot;data&quot;: {
        &quot;attr_id&quot;: 44,
        &quot;attr_name&quot;: &quot;测试参数&quot;,
        &quot;cat_id&quot;: &quot;1&quot;,
        &quot;attr_sel&quot;: &quot;many&quot;,
        &quot;attr_write&quot;: &quot;list&quot;,
        &quot;attr_vals&quot;: &quot;a,b,c&quot;
    },
    &quot;meta&quot;: {
        &quot;msg&quot;: &quot;创建成功&quot;,
        &quot;status&quot;: 201
    }
}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br></div></div><h3 id="_1-7-3-删除参数"><a href="#_1-7-3-删除参数" class="header-anchor">#</a> 1.7.3. 删除参数</h3> <ul><li>请求路径： categories/:id/attributes/:attrid</li> <li>请求方法：delete</li> <li>请求参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>:id</td> <td>分类 ID</td> <td>不能为空<code>携带在url中</code></td></tr> <tr><td>:attrid</td> <td>参数 ID</td> <td>不能为空<code>携带在url中</code></td></tr></tbody></table> <ul><li>响应数据</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>{
    &quot;data&quot;: null,
    &quot;meta&quot;: {
        &quot;msg&quot;: &quot;删除成功&quot;,
        &quot;status&quot;: 200
    }
}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br></div></div><h3 id="_1-7-4-根据-id-查询参数"><a href="#_1-7-4-根据-id-查询参数" class="header-anchor">#</a> 1.7.4. 根据 ID 查询参数</h3> <ul><li>请求路径：categories/:id/attributes/:attrId</li> <li>请求方法：get</li> <li>请求参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>:id</td> <td>分类 ID</td> <td>不能为空<code>携带在url中</code></td></tr> <tr><td>:attrId</td> <td>属性 ID</td> <td>不能为空<code>携带在url中</code></td></tr> <tr><td>attr_sel</td> <td>[only,many]</td> <td>不能为空</td></tr> <tr><td>attr_vals</td> <td>如果是 many 就需要填写值的选项，以逗号分隔</td> <td></td></tr></tbody></table> <ul><li>响应数据</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>{
    &quot;data&quot;: {
        &quot;attr_id&quot;: 1,
        &quot;attr_name&quot;: &quot;cpu&quot;,
        &quot;cat_id&quot;: 22,
        &quot;attr_sel&quot;: &quot;only&quot;,
        &quot;attr_write&quot;: &quot;manual&quot;,
        &quot;attr_vals&quot;: &quot;ffff&quot;
    },
    &quot;meta&quot;: {
        &quot;msg&quot;: &quot;获取成功&quot;,
        &quot;status&quot;: 200
    }
}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br></div></div><h3 id="_1-7-5-编辑提交参数"><a href="#_1-7-5-编辑提交参数" class="header-anchor">#</a> 1.7.5. 编辑提交参数</h3> <ul><li>请求路径：categories/:id/attributes/:attrId</li> <li>请求方法：put</li> <li>请求参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>:id</td> <td>分类 ID</td> <td>不能为空<code>携带在url中</code></td></tr> <tr><td>:attrId</td> <td>属性 ID</td> <td>不能为空<code>携带在url中</code></td></tr> <tr><td>attr_name</td> <td>新属性的名字</td> <td>不能为空，携带在<code>请求体</code>中</td></tr> <tr><td>attr_sel</td> <td>属性的类型[many或only]</td> <td>不能为空，携带在<code>请求体</code>中</td></tr> <tr><td>attr_vals</td> <td>参数的属性值</td> <td>可选参数，携带在<code>请求体</code>中</td></tr></tbody></table> <ul><li>响应数据</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>{
    &quot;data&quot;: {
        &quot;attr_id&quot;: 9,
        &quot;attr_name&quot;: &quot;测试更新&quot;,
        &quot;cat_id&quot;: &quot;43&quot;,
        &quot;attr_sel&quot;: &quot;only&quot;,
        &quot;attr_write&quot;: &quot;manual&quot;,
        &quot;attr_vals&quot;: &quot;abc&quot;
    },
    &quot;meta&quot;: {
        &quot;msg&quot;: &quot;更新成功&quot;,
        &quot;status&quot;: 200
    }
}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br></div></div><h2 id="_1-8-商品管理"><a href="#_1-8-商品管理" class="header-anchor">#</a> 1.8. 商品管理</h2> <h3 id="_1-8-1-商品列表数据"><a href="#_1-8-1-商品列表数据" class="header-anchor">#</a> 1.8.1. 商品列表数据</h3> <ul><li>请求路径：goods</li> <li>请求方法：get</li> <li>请求参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>query</td> <td>查询参数</td> <td>可以为空</td></tr> <tr><td>pagenum</td> <td>当前页码</td> <td>不能为空</td></tr> <tr><td>pagesize</td> <td>每页显示条数</td> <td>不能为空</td></tr></tbody></table> <ul><li>响应参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>total</td> <td>总共商品条数</td> <td></td></tr> <tr><td>pagenum</td> <td>当前商品页数</td> <td></td></tr> <tr><td>goods_id</td> <td>商品 ID</td> <td></td></tr> <tr><td>goods_name</td> <td>商品名称</td> <td></td></tr> <tr><td>goods_price</td> <td>价格</td> <td></td></tr> <tr><td>goods_number</td> <td>数量</td> <td></td></tr> <tr><td>goods_weight</td> <td>重量</td> <td>不能为空</td></tr> <tr><td>goods_state</td> <td>商品状态</td> <td>商品状态 0: 未通过 1: 审核中 2: 已审核</td></tr> <tr><td>add_time</td> <td>添加时间</td> <td></td></tr> <tr><td>upd_time</td> <td>更新时间</td> <td></td></tr> <tr><td>hot_mumber</td> <td>热销品数量</td> <td></td></tr> <tr><td>is_promote</td> <td>是否是热销品</td> <td></td></tr></tbody></table> <ul><li>响应数据</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>{
    &quot;data&quot;: {
        &quot;total&quot;: 50,
        &quot;pagenum&quot;: &quot;1&quot;,
        &quot;goods&quot;: [
            {
                &quot;goods_id&quot;: 144,
                &quot;goods_name&quot;: &quot;asfdsd&quot;,
                &quot;goods_price&quot;: 1,
                &quot;goods_number&quot;: 1,
                &quot;goods_weight&quot;: 1,
                &quot;goods_state&quot;: null,
                &quot;add_time&quot;: 1512954923,
                &quot;upd_time&quot;: 1512954923,
                &quot;hot_mumber&quot;: 0,
                &quot;is_promote&quot;: false
            }
        ]
    },
    &quot;meta&quot;: {
        &quot;msg&quot;: &quot;获取成功&quot;,
        &quot;status&quot;: 200
    }
}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br></div></div><h3 id="_1-8-2-添加商品"><a href="#_1-8-2-添加商品" class="header-anchor">#</a> 1.8.2. 添加商品</h3> <ul><li>请求路径：goods</li> <li>请求方法：post</li> <li>请求参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>goods_name</td> <td>商品名称</td> <td>不能为空</td></tr> <tr><td>goods_cat</td> <td>以为','分割的分类列表</td> <td>不能为空</td></tr> <tr><td>goods_price</td> <td>价格</td> <td>不能为空</td></tr> <tr><td>goods_number</td> <td>数量</td> <td>不能为空</td></tr> <tr><td>goods_weight</td> <td>重量</td> <td>不能为空</td></tr> <tr><td>goods_introduce</td> <td>介绍</td> <td>可以为空</td></tr> <tr><td>pics</td> <td>上传的图片临时路径（对象）</td> <td>可以为空</td></tr> <tr><td>attrs</td> <td>商品的参数（数组），包含 <code>动态参数</code> 和 <code>静态属性</code></td> <td>可以为空</td></tr></tbody></table> <ul><li>请求数据</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>{
  &quot;goods_name&quot;:&quot;test_goods_name2&quot;,
  &quot;goods_cat&quot;: &quot;1,2,3&quot;,
  &quot;goods_price&quot;:20,
  &quot;goods_number&quot;:30,
  &quot;goods_weight&quot;:40,
  &quot;goods_introduce&quot;:&quot;abc&quot;,
  &quot;pics&quot;:[
    {&quot;pic&quot;:&quot;/tmp_uploads/30f08d52c551ecb447277eae232304b8&quot;}
    ],
  &quot;attrs&quot;:[
    {
      &quot;attr_id&quot;:15,
      &quot;attr_value&quot;:&quot;ddd&quot;
    },
    {
      &quot;attr_id&quot;:15,
      &quot;attr_value&quot;:&quot;eee&quot;
    }
    ]
}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br></div></div><ul><li>响应参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>total</td> <td>总共商品条数</td> <td></td></tr> <tr><td>pagenum</td> <td>当前商品页数</td> <td></td></tr> <tr><td>goods_id</td> <td>商品 ID</td> <td></td></tr> <tr><td>goods_cat</td> <td>以为','分割的分类列表</td> <td></td></tr> <tr><td>goods_name</td> <td>商品名称</td> <td></td></tr> <tr><td>goods_price</td> <td>价格</td> <td></td></tr> <tr><td>goods_number</td> <td>数量</td> <td></td></tr> <tr><td>goods_weight</td> <td>重量</td> <td>不能为空</td></tr> <tr><td>goods_state</td> <td>商品状态</td> <td>商品状态 0: 未通过 1: 审核中 2: 已审核</td></tr> <tr><td>add_time</td> <td>添加时间</td> <td></td></tr> <tr><td>upd_time</td> <td>更新时间</td> <td></td></tr> <tr><td>hot_mumber</td> <td>热销品数量</td> <td></td></tr> <tr><td>is_promote</td> <td>是否是热销品</td> <td></td></tr> <tr><td>pics</td> <td>上传的图片临时路径（对象）</td> <td>pics_id:图片 ID,goods_id:商品 ID,pics_big:大图,pics_mid:中图,pics_sma:小图</td></tr> <tr><td>attrs</td> <td>商品的参数（数组）</td> <td>goods_id:商品 ID,attr_value:当前商品的参数值,add_price:浮动价格,attr_vals:预定义的参数值,attr_sel:手动输入，还是单选,</td></tr></tbody></table> <ul><li>响应数据</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>{
    &quot;data&quot;: {
        &quot;goods_id&quot;: 145,
        &quot;goods_name&quot;: &quot;test_goods_name2&quot;,
        &quot;goods_price&quot;: 20,
        &quot;cat_id&quot;: 1,
        &quot;goods_number&quot;: 30,
        &quot;goods_weight&quot;: 40,
        &quot;goods_introduce&quot;: &quot;abc&quot;,
        &quot;goods_big_logo&quot;: &quot;&quot;,
        &quot;goods_small_logo&quot;: &quot;&quot;,
        &quot;goods_state&quot;: 1,
        &quot;add_time&quot;: 1512962370,
        &quot;upd_time&quot;: 1512962370,
        &quot;hot_mumber&quot;: 0,
        &quot;is_promote&quot;: false,
        &quot;pics&quot;: [
            {
                &quot;pics_id&quot;: 397,
                &quot;goods_id&quot;: 145,
                &quot;pics_big&quot;: &quot;uploads/goodspics/big_30f08d52c551ecb447277eae232304b8&quot;,
                &quot;pics_mid&quot;: &quot;uploads/goodspics/mid_30f08d52c551ecb447277eae232304b8&quot;,
                &quot;pics_sma&quot;: &quot;uploads/goodspics/sma_30f08d52c551ecb447277eae232304b8&quot;
            }
        ],
        &quot;attrs&quot;: [
            {
                &quot;goods_id&quot;: 145,
                &quot;attr_id&quot;: 15,
                &quot;attr_value&quot;: &quot;ddd&quot;,
                &quot;add_price&quot;: null,
                &quot;attr_name&quot;: &quot;fffffff&quot;,
                &quot;attr_sel&quot;: &quot;many&quot;,
                &quot;attr_write&quot;: &quot;list&quot;,
                &quot;attr_vals&quot;: &quot;&quot;
            },
            {
                &quot;goods_id&quot;: 145,
                &quot;attr_id&quot;: 15,
                &quot;attr_value&quot;: &quot;eee&quot;,
                &quot;add_price&quot;: null,
                &quot;attr_name&quot;: &quot;fffffff&quot;,
                &quot;attr_sel&quot;: &quot;many&quot;,
                &quot;attr_write&quot;: &quot;list&quot;,
                &quot;attr_vals&quot;: &quot;&quot;
            }
        ]
    },
    &quot;meta&quot;: {
        &quot;msg&quot;: &quot;创建商品成功&quot;,
        &quot;status&quot;: 201
    }
}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br><span class="line-number">31</span><br><span class="line-number">32</span><br><span class="line-number">33</span><br><span class="line-number">34</span><br><span class="line-number">35</span><br><span class="line-number">36</span><br><span class="line-number">37</span><br><span class="line-number">38</span><br><span class="line-number">39</span><br><span class="line-number">40</span><br><span class="line-number">41</span><br><span class="line-number">42</span><br><span class="line-number">43</span><br><span class="line-number">44</span><br><span class="line-number">45</span><br><span class="line-number">46</span><br><span class="line-number">47</span><br><span class="line-number">48</span><br><span class="line-number">49</span><br><span class="line-number">50</span><br><span class="line-number">51</span><br><span class="line-number">52</span><br><span class="line-number">53</span><br></div></div><h3 id="_1-8-3-根据-id-查询商品"><a href="#_1-8-3-根据-id-查询商品" class="header-anchor">#</a> 1.8.3. 根据 ID 查询商品</h3> <ul><li>请求路径：goods/:id</li> <li>请求方法：get</li> <li>请求参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>id</td> <td>商品 ID</td> <td>不能为空<code>携带在url中</code></td></tr></tbody></table> <ul><li>响应参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>total</td> <td>总共商品条数</td> <td></td></tr> <tr><td>pagenum</td> <td>当前商品页数</td> <td></td></tr> <tr><td>goods_id</td> <td>商品 ID</td> <td></td></tr> <tr><td>goods_name</td> <td>商品名称</td> <td></td></tr> <tr><td>goods_price</td> <td>价格</td> <td></td></tr> <tr><td>goods_number</td> <td>数量</td> <td></td></tr> <tr><td>goods_weight</td> <td>重量</td> <td>不能为空</td></tr> <tr><td>goods_state</td> <td>商品状态</td> <td>商品状态 0: 未通过 1: 审核中 2: 已审核</td></tr> <tr><td>add_time</td> <td>添加时间</td> <td></td></tr> <tr><td>upd_time</td> <td>更新时间</td> <td></td></tr> <tr><td>hot_mumber</td> <td>热销品数量</td> <td></td></tr> <tr><td>is_promote</td> <td>是否是热销品</td> <td></td></tr> <tr><td>pics</td> <td>上传的图片临时路径（对象）</td> <td>pics_id:图片 ID,goods_id:商品 ID,pics_big:大图,pics_mid:中图,pics_sma:小图</td></tr> <tr><td>attrs</td> <td>商品的参数（数组）</td> <td>goods_id:商品 ID,attr_value:当前商品的参数值,add_price:浮动价格,attr_vals:预定义的参数值,attr_sel:手动输入，还是单选,</td></tr></tbody></table> <ul><li>响应数据</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>{
    &quot;data&quot;: {
        &quot;goods_id&quot;: 145,
        &quot;goods_name&quot;: &quot;test_goods_name2&quot;,
        &quot;goods_price&quot;: 20,
        &quot;goods_number&quot;: 30,
        &quot;goods_weight&quot;: 40,
        &quot;goods_introduce&quot;: &quot;abc&quot;,
        &quot;goods_big_logo&quot;: &quot;&quot;,
        &quot;goods_small_logo&quot;: &quot;&quot;,
        &quot;goods_state&quot;: 1,
        &quot;add_time&quot;: 1512962370,
        &quot;upd_time&quot;: 1512962370,
        &quot;hot_mumber&quot;: 0,
        &quot;is_promote&quot;: false,
        &quot;pics&quot;: [
            {
                &quot;pics_id&quot;: 397,
                &quot;goods_id&quot;: 145,
                &quot;pics_big&quot;: &quot;uploads/goodspics/big_30f08d52c551ecb447277eae232304b8&quot;,
                &quot;pics_mid&quot;: &quot;uploads/goodspics/mid_30f08d52c551ecb447277eae232304b8&quot;,
                &quot;pics_sma&quot;: &quot;uploads/goodspics/sma_30f08d52c551ecb447277eae232304b8&quot;
            }
        ],
        &quot;attrs&quot;: [
            {
                &quot;goods_id&quot;: 145,
                &quot;attr_id&quot;: 15,
                &quot;attr_value&quot;: &quot;ddd&quot;,
                &quot;add_price&quot;: null,
                &quot;attr_name&quot;: &quot;fffffff&quot;,
                &quot;attr_sel&quot;: &quot;many&quot;,
                &quot;attr_write&quot;: &quot;list&quot;,
                &quot;attr_vals&quot;: &quot;&quot;
            },
            {
                &quot;goods_id&quot;: 145,
                &quot;attr_id&quot;: 15,
                &quot;attr_value&quot;: &quot;eee&quot;,
                &quot;add_price&quot;: null,
                &quot;attr_name&quot;: &quot;fffffff&quot;,
                &quot;attr_sel&quot;: &quot;many&quot;,
                &quot;attr_write&quot;: &quot;list&quot;,
                &quot;attr_vals&quot;: &quot;&quot;
            }
        ]
    },
    &quot;meta&quot;: {
        &quot;msg&quot;: &quot;创建商品成功&quot;,
        &quot;status&quot;: 201
    }
}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br><span class="line-number">31</span><br><span class="line-number">32</span><br><span class="line-number">33</span><br><span class="line-number">34</span><br><span class="line-number">35</span><br><span class="line-number">36</span><br><span class="line-number">37</span><br><span class="line-number">38</span><br><span class="line-number">39</span><br><span class="line-number">40</span><br><span class="line-number">41</span><br><span class="line-number">42</span><br><span class="line-number">43</span><br><span class="line-number">44</span><br><span class="line-number">45</span><br><span class="line-number">46</span><br><span class="line-number">47</span><br><span class="line-number">48</span><br><span class="line-number">49</span><br><span class="line-number">50</span><br><span class="line-number">51</span><br><span class="line-number">52</span><br></div></div><h3 id="_1-8-4-编辑提交商品"><a href="#_1-8-4-编辑提交商品" class="header-anchor">#</a> 1.8.4. 编辑提交商品</h3> <ul><li>请求路径：goods/:id</li> <li>请求方法：put</li> <li>请求参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>id</td> <td>商品 ID</td> <td>不能为空<code>携带在url中</code></td></tr> <tr><td>goods_name</td> <td>商品名称</td> <td>不能为空</td></tr> <tr><td>goods_price</td> <td>价格</td> <td>不能为空</td></tr> <tr><td>goods_number</td> <td>数量</td> <td>不能为空</td></tr> <tr><td>goods_weight</td> <td>重量</td> <td>不能为空</td></tr> <tr><td>goods_introduce</td> <td>介绍</td> <td>可以为空</td></tr> <tr><td>pics</td> <td>上传的图片临时路径（对象）</td> <td>可以为空</td></tr> <tr><td>attrs</td> <td>商品的参数（数组）</td> <td>可以为空</td></tr></tbody></table> <ul><li>请求数据</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>{
  &quot;goods_name&quot;:&quot;test_goods_name2&quot;,
  &quot;goods_price&quot;:20,
  &quot;goods_number&quot;:30,
  &quot;goods_weight&quot;:40,
  &quot;goods_introduce&quot;:&quot;abc&quot;,
  &quot;pics&quot;:[
    {&quot;pic&quot;:&quot;/tmp_uploads/30f08d52c551ecb447277eae232304b8&quot;}
    ],
  &quot;attrs&quot;:[
    {
      &quot;attr_id&quot;:15,
      &quot;attr_value&quot;:&quot;ddd&quot;
    },
    {
      &quot;attr_id&quot;:15,
      &quot;attr_value&quot;:&quot;eee&quot;
    }
    ]
}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br></div></div><ul><li>响应参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>total</td> <td>总共商品条数</td> <td></td></tr> <tr><td>pagenum</td> <td>当前商品页数</td> <td></td></tr> <tr><td>goods_id</td> <td>商品 ID</td> <td></td></tr> <tr><td>goods_name</td> <td>商品名称</td> <td></td></tr> <tr><td>goods_price</td> <td>价格</td> <td></td></tr> <tr><td>goods_number</td> <td>数量</td> <td></td></tr> <tr><td>goods_weight</td> <td>重量</td> <td>不能为空</td></tr> <tr><td>goods_state</td> <td>商品状态</td> <td>商品状态 0: 未通过 1: 审核中 2: 已审核</td></tr> <tr><td>add_time</td> <td>添加时间</td> <td></td></tr> <tr><td>upd_time</td> <td>更新时间</td> <td></td></tr> <tr><td>hot_mumber</td> <td>热销品数量</td> <td></td></tr> <tr><td>is_promote</td> <td>是否是热销品</td> <td></td></tr> <tr><td>pics</td> <td>上传的图片临时路径（对象）</td> <td>pics_id:图片 ID,goods_id:商品 ID,pics_big:大图,pics_mid:中图,pics_sma:小图</td></tr> <tr><td>attrs</td> <td>商品的参数（数组）</td> <td>goods_id:商品 ID,attr_value:当前商品的参数值,add_price:浮动价格,attr_vals:预定义的参数值,attr_sel:手动输入，还是单选,</td></tr></tbody></table> <ul><li>响应数据</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>{
    &quot;data&quot;: {
        &quot;goods_id&quot;: 145,
        &quot;goods_name&quot;: &quot;test_goods_name2&quot;,
        &quot;goods_price&quot;: 20,
        &quot;goods_number&quot;: 30,
        &quot;goods_weight&quot;: 40,
        &quot;goods_introduce&quot;: &quot;abc&quot;,
        &quot;goods_big_logo&quot;: &quot;&quot;,
        &quot;goods_small_logo&quot;: &quot;&quot;,
        &quot;goods_state&quot;: 1,
        &quot;add_time&quot;: 1512962370,
        &quot;upd_time&quot;: 1512962370,
        &quot;hot_mumber&quot;: 0,
        &quot;is_promote&quot;: false,
        &quot;pics&quot;: [
            {
                &quot;pics_id&quot;: 397,
                &quot;goods_id&quot;: 145,
                &quot;pics_big&quot;: &quot;uploads/goodspics/big_30f08d52c551ecb447277eae232304b8&quot;,
                &quot;pics_mid&quot;: &quot;uploads/goodspics/mid_30f08d52c551ecb447277eae232304b8&quot;,
                &quot;pics_sma&quot;: &quot;uploads/goodspics/sma_30f08d52c551ecb447277eae232304b8&quot;
            }
        ],
        &quot;attrs&quot;: [
            {
                &quot;goods_id&quot;: 145,
                &quot;attr_id&quot;: 15,
                &quot;attr_value&quot;: &quot;ddd&quot;,
                &quot;add_price&quot;: null,
                &quot;attr_name&quot;: &quot;fffffff&quot;,
                &quot;attr_sel&quot;: &quot;many&quot;,
                &quot;attr_write&quot;: &quot;list&quot;,
                &quot;attr_vals&quot;: &quot;&quot;
            },
            {
                &quot;goods_id&quot;: 145,
                &quot;attr_id&quot;: 15,
                &quot;attr_value&quot;: &quot;eee&quot;,
                &quot;add_price&quot;: null,
                &quot;attr_name&quot;: &quot;fffffff&quot;,
                &quot;attr_sel&quot;: &quot;many&quot;,
                &quot;attr_write&quot;: &quot;list&quot;,
                &quot;attr_vals&quot;: &quot;&quot;
            }
        ]
    },
    &quot;meta&quot;: {
        &quot;msg&quot;: &quot;创建商品成功&quot;,
        &quot;status&quot;: 201
    }
}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br><span class="line-number">31</span><br><span class="line-number">32</span><br><span class="line-number">33</span><br><span class="line-number">34</span><br><span class="line-number">35</span><br><span class="line-number">36</span><br><span class="line-number">37</span><br><span class="line-number">38</span><br><span class="line-number">39</span><br><span class="line-number">40</span><br><span class="line-number">41</span><br><span class="line-number">42</span><br><span class="line-number">43</span><br><span class="line-number">44</span><br><span class="line-number">45</span><br><span class="line-number">46</span><br><span class="line-number">47</span><br><span class="line-number">48</span><br><span class="line-number">49</span><br><span class="line-number">50</span><br><span class="line-number">51</span><br><span class="line-number">52</span><br></div></div><h3 id="_1-8-5-删除商品"><a href="#_1-8-5-删除商品" class="header-anchor">#</a> 1.8.5. 删除商品</h3> <ul><li>请求路径：goods/:id</li> <li>请求方法：delete</li> <li>请求参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>id</td> <td>商品 ID</td> <td>不能为空<code>携带在url中</code></td></tr></tbody></table> <ul><li>响应数据</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>{
    &quot;data&quot;: null,
    &quot;meta&quot;: {
        &quot;msg&quot;: &quot;删除成功&quot;,
        &quot;status&quot;: 200
    }
}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br></div></div><p>###同步商品图片</p> <ul><li>请求路径：goods/:id/pics</li> <li>请求方法：put</li> <li>请求参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>id</td> <td>商品 ID</td> <td>不能为空<code>携带在url中</code></td></tr> <tr><td>pics</td> <td>商品图片集合</td> <td>如果有 pics_id 字段会保留该图片，如果没有 pics_id 但是有 pic 字段就会新生成图片数据</td></tr></tbody></table> <ul><li>请求数据</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>;[
  { pic: 'tmp_uploads/db28f6316835836e97653b5c75e418be.png' },
  {
    pics_id: 397,
    goods_id: 145,
    pics_big: 'uploads/goodspics/big_30f08d52c551ecb447277eae232304b8',
    pics_mid: 'uploads/goodspics/mid_30f08d52c551ecb447277eae232304b8',
    pics_sma: 'uploads/goodspics/sma_30f08d52c551ecb447277eae232304b8'
  }
]
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br></div></div><ul><li>响应数据</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>{
    &quot;data&quot;: {
        &quot;goods_id&quot;: 96,
        &quot;goods_name&quot;: &quot;iphoneXX&quot;,
        &quot;goods_price&quot;: 2,
        &quot;goods_number&quot;: 22,
        &quot;goods_weight&quot;: 22,
        &quot;goods_introduce&quot;: null,
        &quot;goods_big_logo&quot;: &quot;./uploads/goods/20171113/483a3b8e99e534ec3e4312dbbaee7c9d.jpg&quot;,
        &quot;goods_small_logo&quot;: &quot;./uploads/goods/20171113/small_483a3b8e99e534ec3e4312dbbaee7c9d.jpg&quot;,
        &quot;goods_state&quot;: 0,
        &quot;is_del&quot;: &quot;1&quot;,
        &quot;add_time&quot;: 1510045904,
        &quot;upd_time&quot;: 1512635159,
        &quot;delete_time&quot;: 1512635159,
        &quot;hot_mumber&quot;: 0,
        &quot;is_promote&quot;: false,
        &quot;pics&quot;: [
            {
                &quot;pics_id&quot;: 383,
                &quot;goods_id&quot;: 96,
                &quot;pics_big&quot;: &quot;uploads/goodspics/big_6f5750132abd3f5b2b93dd722fcde653.jpg&quot;,
                &quot;pics_mid&quot;: &quot;uploads/goodspics/mid_6f5750132abd3f5b2b93dd722fcde653.jpg&quot;,
                &quot;pics_sma&quot;: &quot;uploads/goodspics/sma_6f5750132abd3f5b2b93dd722fcde653.jpg&quot;
            }
        ],
        &quot;attrs&quot;: [
            {
                &quot;goods_id&quot;: 96,
                &quot;attr_id&quot;: 15,
                &quot;attr_value&quot;: &quot;eee&quot;,
                &quot;add_price&quot;: null,
                &quot;attr_name&quot;: &quot;fffffff&quot;,
                &quot;attr_sel&quot;: &quot;many&quot;,
                &quot;attr_write&quot;: &quot;list&quot;,
                &quot;attr_vals&quot;: &quot;&quot;
            },
            {
                &quot;goods_id&quot;: 96,
                &quot;attr_id&quot;: 15,
                &quot;attr_value&quot;: &quot;ddd&quot;,
                &quot;add_price&quot;: null,
                &quot;attr_name&quot;: &quot;fffffff&quot;,
                &quot;attr_sel&quot;: &quot;many&quot;,
                &quot;attr_write&quot;: &quot;list&quot;,
                &quot;attr_vals&quot;: &quot;&quot;
            }
        ]
    },
    &quot;meta&quot;: {
        &quot;msg&quot;: &quot;更新成功&quot;,
        &quot;status&quot;: 200
    }
}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br><span class="line-number">31</span><br><span class="line-number">32</span><br><span class="line-number">33</span><br><span class="line-number">34</span><br><span class="line-number">35</span><br><span class="line-number">36</span><br><span class="line-number">37</span><br><span class="line-number">38</span><br><span class="line-number">39</span><br><span class="line-number">40</span><br><span class="line-number">41</span><br><span class="line-number">42</span><br><span class="line-number">43</span><br><span class="line-number">44</span><br><span class="line-number">45</span><br><span class="line-number">46</span><br><span class="line-number">47</span><br><span class="line-number">48</span><br><span class="line-number">49</span><br><span class="line-number">50</span><br><span class="line-number">51</span><br><span class="line-number">52</span><br><span class="line-number">53</span><br><span class="line-number">54</span><br></div></div><p>###同步商品属性</p> <ul><li>请求路径：goods/:id/attributes</li> <li>请求方法：put</li> <li>请求参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>id</td> <td>商品 ID</td> <td>不能为空<code>携带在url中</code></td></tr></tbody></table> <ul><li>请求数据</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>;[
  {
    attr_id: 15,
    attr_value: 'ddd'
  },
  {
    attr_id: 15,
    attr_value: 'eee'
  }
]
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br></div></div><ul><li>响应数据</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>{
    &quot;data&quot;: {
        &quot;goods_id&quot;: 96,
        &quot;goods_name&quot;: &quot;iphoneXX&quot;,
        &quot;goods_price&quot;: 2,
        &quot;goods_number&quot;: 22,
        &quot;goods_weight&quot;: 22,
        &quot;goods_introduce&quot;: null,
        &quot;goods_big_logo&quot;: &quot;./uploads/goods/20171113/483a3b8e99e534ec3e4312dbbaee7c9d.jpg&quot;,
        &quot;goods_small_logo&quot;: &quot;./uploads/goods/20171113/small_483a3b8e99e534ec3e4312dbbaee7c9d.jpg&quot;,
        &quot;goods_state&quot;: 0,
        &quot;is_del&quot;: &quot;1&quot;,
        &quot;add_time&quot;: 1510045904,
        &quot;upd_time&quot;: 1512635159,
        &quot;delete_time&quot;: 1512635159,
        &quot;hot_mumber&quot;: 0,
        &quot;is_promote&quot;: false,
        &quot;pics&quot;: [
            {
                &quot;pics_id&quot;: 383,
                &quot;goods_id&quot;: 96,
                &quot;pics_big&quot;: &quot;uploads/goodspics/big_6f5750132abd3f5b2b93dd722fcde653.jpg&quot;,
                &quot;pics_mid&quot;: &quot;uploads/goodspics/mid_6f5750132abd3f5b2b93dd722fcde653.jpg&quot;,
                &quot;pics_sma&quot;: &quot;uploads/goodspics/sma_6f5750132abd3f5b2b93dd722fcde653.jpg&quot;
            }
        ],
        &quot;attrs&quot;: [
            {
                &quot;goods_id&quot;: 96,
                &quot;attr_id&quot;: 15,
                &quot;attr_value&quot;: &quot;eee&quot;,
                &quot;add_price&quot;: null,
                &quot;attr_name&quot;: &quot;fffffff&quot;,
                &quot;attr_sel&quot;: &quot;many&quot;,
                &quot;attr_write&quot;: &quot;list&quot;,
                &quot;attr_vals&quot;: &quot;&quot;
            },
            {
                &quot;goods_id&quot;: 96,
                &quot;attr_id&quot;: 15,
                &quot;attr_value&quot;: &quot;ddd&quot;,
                &quot;add_price&quot;: null,
                &quot;attr_name&quot;: &quot;fffffff&quot;,
                &quot;attr_sel&quot;: &quot;many&quot;,
                &quot;attr_write&quot;: &quot;list&quot;,
                &quot;attr_vals&quot;: &quot;&quot;
            }
        ]
    },
    &quot;meta&quot;: {
        &quot;msg&quot;: &quot;更新成功&quot;,
        &quot;status&quot;: 200
    }
}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br><span class="line-number">31</span><br><span class="line-number">32</span><br><span class="line-number">33</span><br><span class="line-number">34</span><br><span class="line-number">35</span><br><span class="line-number">36</span><br><span class="line-number">37</span><br><span class="line-number">38</span><br><span class="line-number">39</span><br><span class="line-number">40</span><br><span class="line-number">41</span><br><span class="line-number">42</span><br><span class="line-number">43</span><br><span class="line-number">44</span><br><span class="line-number">45</span><br><span class="line-number">46</span><br><span class="line-number">47</span><br><span class="line-number">48</span><br><span class="line-number">49</span><br><span class="line-number">50</span><br><span class="line-number">51</span><br><span class="line-number">52</span><br><span class="line-number">53</span><br><span class="line-number">54</span><br></div></div><p>###商品图片处理必须安装 GraphicsMagick</p> <ul><li>linux</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>apt-get install GraphicsMagick
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><ul><li>Mac OS X</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>brew install GraphicsMagick
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><ul><li>Windows <a href="https://sourceforge.net/projects/graphicsmagick/files/graphicsmagick-binaries/1.3.27/GraphicsMagick-1.3.27-Q8-win64-dll.exe/download" target="_blank" rel="noopener noreferrer">点击下载<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul> <h2 id="_1-9-图片上传"><a href="#_1-9-图片上传" class="header-anchor">#</a> 1.9. 图片上传</h2> <ul><li>请求路径：upload</li> <li>请求方法：post</li> <li>请求参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>file</td> <td>上传文件</td> <td></td></tr></tbody></table> <ul><li>响应数据</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>{
    &quot;data&quot;: {
        &quot;tmp_path&quot;: &quot;tmp_uploads/ccfc5179a914e94506bcbb7377e8985f.png&quot;,
        &quot;url&quot;: &quot;http://127.0.0.1:8888tmp_uploads/ccfc5179a914e94506bcbb7377e8985f.png&quot;
    },
    &quot;meta&quot;: {
        &quot;msg&quot;: &quot;上传成功&quot;,
        &quot;status&quot;: 200
    }
}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br></div></div><h2 id="_1-10-订单管理"><a href="#_1-10-订单管理" class="header-anchor">#</a> 1.10. 订单管理</h2> <h3 id="_1-10-1-订单数据列表"><a href="#_1-10-1-订单数据列表" class="header-anchor">#</a> 1.10.1. 订单数据列表</h3> <ul><li>请求路径：orders</li> <li>请求方法：get</li> <li>请求参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>query</td> <td>查询参数</td> <td>可以为空</td></tr> <tr><td>pagenum</td> <td>当前页码</td> <td>不能为空</td></tr> <tr><td>pagesize</td> <td>每页显示条数</td> <td>不能为空</td></tr> <tr><td>user_id</td> <td>用户 ID</td> <td>可以为空</td></tr> <tr><td>pay_status</td> <td>支付状态</td> <td>可以为空</td></tr> <tr><td>is_send</td> <td>是否发货</td> <td>可以为空</td></tr> <tr><td>order_fapiao_title</td> <td>['个人','公司']</td> <td>可以为空</td></tr> <tr><td>order_fapiao_company</td> <td>公司名称</td> <td>可以为空</td></tr> <tr><td>order_fapiao_content</td> <td>发票内容</td> <td>可以为空</td></tr> <tr><td>consignee_addr</td> <td>发货地址</td> <td>可以为空</td></tr></tbody></table> <ul><li>响应数据</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>{
    &quot;data&quot;: {
        &quot;total&quot;: 1,
        &quot;pagenum&quot;: &quot;1&quot;,
        &quot;goods&quot;: [
            {
                &quot;order_id&quot;: 47,
                &quot;user_id&quot;: 133,
                &quot;order_number&quot;: &quot;itcast-59e7502d7993d&quot;,
                &quot;order_price&quot;: 322,
                &quot;order_pay&quot;: &quot;1&quot;,
                &quot;is_send&quot;: &quot;是&quot;,
                &quot;trade_no&quot;: &quot;&quot;,
                &quot;order_fapiao_title&quot;: &quot;个人&quot;,
                &quot;order_fapiao_company&quot;: &quot;&quot;,
                &quot;order_fapiao_content&quot;: &quot;办公用品&quot;,
                &quot;consignee_addr&quot;: &quot;a:7:{s:6:\&quot;cgn_id\&quot;;i:1;s:7:\&quot;user_id\&quot;;i:133;s:8:\&quot;cgn_name\&quot;;s:9:\&quot;王二柱\&quot;;s:11:\&quot;cgn_address\&quot;;s:51:\&quot;北京市海淀区苏州街长远天地大厦305室\&quot;;s:7:\&quot;cgn_tel\&quot;;s:11:\&quot;13566771298\&quot;;s:8:\&quot;cgn_code\&quot;;s:6:\&quot;306810\&quot;;s:11:\&quot;delete_time\&quot;;N;}&quot;,
                &quot;pay_status&quot;: &quot;1&quot;,
                &quot;create_time&quot;: 1508331565,
                &quot;update_time&quot;: 1508331565
            }
        ]
    },
    &quot;meta&quot;: {
        &quot;msg&quot;: &quot;获取成功&quot;,
        &quot;status&quot;: 200
    }
}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br></div></div><h3 id="_1-10-2-修改订单状态"><a href="#_1-10-2-修改订单状态" class="header-anchor">#</a> 1.10.2. 修改订单状态</h3> <ul><li>请求路径：orders/:id</li> <li>请求方法：put</li> <li>请求参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>id</td> <td>订单 ID</td> <td>不能为空<code>携带在url中</code></td></tr> <tr><td>is_send</td> <td>订单是否发货</td> <td>1:已经发货，0:未发货</td></tr> <tr><td>order_pay</td> <td>订单支付</td> <td>支付方式 0 未支付 1 支付宝 2 微信 3 银行卡</td></tr> <tr><td>order_price</td> <td>订单价格</td> <td></td></tr> <tr><td>order_number</td> <td>订单数量</td> <td></td></tr> <tr><td>pay_status</td> <td>支付状态</td> <td>订单状态： 0 未付款、1 已付款</td></tr></tbody></table> <ul><li>请求数据说明
<ul><li>所有请求数据都是增量更新，如果参数不填写，就不会更新该字段</li></ul></li> <li>响应数据</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>{
    &quot;data&quot;: {
        &quot;order_id&quot;: 67,
        &quot;user_id&quot;: 1,
        &quot;order_number&quot;: &quot;itcast-g7kmck71vjaujfgoi&quot;,
        &quot;order_price&quot;: 20,
        &quot;order_pay&quot;: &quot;0&quot;,
        &quot;is_send&quot;: &quot;否&quot;,
        &quot;trade_no&quot;: &quot;&quot;,
        &quot;order_fapiao_title&quot;: &quot;个人&quot;,
        &quot;order_fapiao_company&quot;: &quot;&quot;,
        &quot;order_fapiao_content&quot;: &quot;&quot;,
        &quot;consignee_addr&quot;: &quot;&quot;,
        &quot;pay_status&quot;: &quot;0&quot;,
        &quot;create_time&quot;: 1512533560,
        &quot;update_time&quot;: 1512533560,
        &quot;goods&quot;: [
            {
                &quot;id&quot;: 82,
                &quot;order_id&quot;: 67,
                &quot;goods_id&quot;: 96,
                &quot;goods_price&quot;: 333,
                &quot;goods_number&quot;: 2,
                &quot;goods_total_price&quot;: 999
            },
            {
                &quot;id&quot;: 83,
                &quot;order_id&quot;: 67,
                &quot;goods_id&quot;: 95,
                &quot;goods_price&quot;: 666,
                &quot;goods_number&quot;: 5,
                &quot;goods_total_price&quot;: 999
            }
        ]
    },
    &quot;meta&quot;: {
        &quot;msg&quot;: &quot;获取成功&quot;,
        &quot;status&quot;: 200
    }
}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br><span class="line-number">31</span><br><span class="line-number">32</span><br><span class="line-number">33</span><br><span class="line-number">34</span><br><span class="line-number">35</span><br><span class="line-number">36</span><br><span class="line-number">37</span><br><span class="line-number">38</span><br><span class="line-number">39</span><br><span class="line-number">40</span><br></div></div><h3 id="_1-10-3-查看订单详情"><a href="#_1-10-3-查看订单详情" class="header-anchor">#</a> 1.10.3. 查看订单详情</h3> <ul><li>请求路径：orders/:id</li> <li>请求方法：get</li> <li>请求参数</li></ul> <table><thead><tr><th>参数名</th> <th>参数说明</th> <th>备注</th></tr></thead> <tbody><tr><td>id</td> <td>订单 ID</td> <td>不能为空<code>携带在url中</code></td></tr></tbody></table> <ul><li>响应数据</li></ul> <div class="language- line-numbers-mode"><pre class="language-text"><code>{
    &quot;data&quot;: {
        &quot;order_id&quot;: 67,
        &quot;user_id&quot;: 1,
        &quot;order_number&quot;: &quot;itcast-g7kmck71vjaujfgoi&quot;,
        &quot;order_price&quot;: 20,
        &quot;order_pay&quot;: &quot;0&quot;,
        &quot;is_send&quot;: &quot;否&quot;,
        &quot;trade_no&quot;: &quot;&quot;,
        &quot;order_fapiao_title&quot;: &quot;个人&quot;,
        &quot;order_fapiao_company&quot;: &quot;&quot;,
        &quot;order_fapiao_content&quot;: &quot;&quot;,
        &quot;consignee_addr&quot;: &quot;&quot;,
        &quot;pay_status&quot;: &quot;0&quot;,
        &quot;create_time&quot;: 1512533560,
        &quot;update_time&quot;: 1512533560,
        &quot;goods&quot;: [
            {
                &quot;id&quot;: 82,
                &quot;order_id&quot;: 67,
                &quot;goods_id&quot;: 96,
                &quot;goods_price&quot;: 333,
                &quot;goods_number&quot;: 2,
                &quot;goods_total_price&quot;: 999
            },
            {
                &quot;id&quot;: 83,
                &quot;order_id&quot;: 67,
                &quot;goods_id&quot;: 95,
                &quot;goods_price&quot;: 666,
                &quot;goods_number&quot;: 5,
                &quot;goods_total_price&quot;: 999
            }
        ]
    },
    &quot;meta&quot;: {
        &quot;msg&quot;: &quot;获取成功&quot;,
        &quot;status&quot;: 200
    }
}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br><span class="line-number">31</span><br><span class="line-number">32</span><br><span class="line-number">33</span><br><span class="line-number">34</span><br><span class="line-number">35</span><br><span class="line-number">36</span><br><span class="line-number">37</span><br><span class="line-number">38</span><br><span class="line-number">39</span><br><span class="line-number">40</span><br></div></div><h3 id="_1-10-4-修改地址"><a href="#_1-10-4-修改地址" class="header-anchor">#</a> 1.10.4. 修改地址</h3> <ol><li><a href="https://github.com/iceyangcc/provinces-china" target="_blank" rel="noopener noreferrer">省市区/县联动效果 - 结合ElementUI的 el-cascader 组件<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ol> <h3 id="_1-10-5-查看物流信息"><a href="#_1-10-5-查看物流信息" class="header-anchor">#</a> 1.10.5. 查看物流信息</h3> <ul><li><p>请求路径：/kuaidi/:id</p></li> <li><p>请求方法：get</p></li> <li><p>供测试的物流单号：1106975712662</p></li> <li><p>响应数据：</p> <div class="language- line-numbers-mode"><pre class="language-text"><code>{
  &quot;data&quot;: [
    {
      &quot;time&quot;: &quot;2018-05-10 09:39:00&quot;,
      &quot;ftime&quot;: &quot;2018-05-10 09:39:00&quot;,
      &quot;context&quot;: &quot;已签收,感谢使用顺丰,期待再次为您服务&quot;,
      &quot;location&quot;: &quot;&quot;
    },
    {
      &quot;time&quot;: &quot;2018-05-10 08:23:00&quot;,
      &quot;ftime&quot;: &quot;2018-05-10 08:23:00&quot;,
      &quot;context&quot;: &quot;[北京市]北京海淀育新小区营业点派件员 顺丰速运 95338正在为您派件&quot;,
      &quot;location&quot;: &quot;&quot;
    },
    {
      &quot;time&quot;: &quot;2018-05-10 07:32:00&quot;,
      &quot;ftime&quot;: &quot;2018-05-10 07:32:00&quot;,
      &quot;context&quot;: &quot;快件到达 [北京海淀育新小区营业点]&quot;,
      &quot;location&quot;: &quot;&quot;
    },
    {
      &quot;time&quot;: &quot;2018-05-10 02:03:00&quot;,
      &quot;ftime&quot;: &quot;2018-05-10 02:03:00&quot;,
      &quot;context&quot;: &quot;快件在[北京顺义集散中心]已装车,准备发往 [北京海淀育新小区营业点]&quot;,
      &quot;location&quot;: &quot;&quot;
    },
    {
      &quot;time&quot;: &quot;2018-05-09 23:05:00&quot;,
      &quot;ftime&quot;: &quot;2018-05-09 23:05:00&quot;,
      &quot;context&quot;: &quot;快件到达 [北京顺义集散中心]&quot;,
      &quot;location&quot;: &quot;&quot;
    },
    {
      &quot;time&quot;: &quot;2018-05-09 21:21:00&quot;,
      &quot;ftime&quot;: &quot;2018-05-09 21:21:00&quot;,
      &quot;context&quot;: &quot;快件在[北京宝胜营业点]已装车,准备发往 [北京顺义集散中心]&quot;,
      &quot;location&quot;: &quot;&quot;
    },
    {
      &quot;time&quot;: &quot;2018-05-09 13:07:00&quot;,
      &quot;ftime&quot;: &quot;2018-05-09 13:07:00&quot;,
      &quot;context&quot;: &quot;顺丰速运 已收取快件&quot;,
      &quot;location&quot;: &quot;&quot;
    },
    {
      &quot;time&quot;: &quot;2018-05-09 12:25:03&quot;,
      &quot;ftime&quot;: &quot;2018-05-09 12:25:03&quot;,
      &quot;context&quot;: &quot;卖家发货&quot;,
      &quot;location&quot;: &quot;&quot;
    },
    {
      &quot;time&quot;: &quot;2018-05-09 12:22:24&quot;,
      &quot;ftime&quot;: &quot;2018-05-09 12:22:24&quot;,
      &quot;context&quot;: &quot;您的订单将由HLA（北京海淀区清河中街店）门店安排发货。&quot;,
      &quot;location&quot;: &quot;&quot;
    },
    {
      &quot;time&quot;: &quot;2018-05-08 21:36:04&quot;,
      &quot;ftime&quot;: &quot;2018-05-08 21:36:04&quot;,
      &quot;context&quot;: &quot;商品已经下单&quot;,
      &quot;location&quot;: &quot;&quot;
    }
  ],
  &quot;meta&quot;: { &quot;status&quot;: 200, &quot;message&quot;: &quot;获取物流信息成功！&quot; }
}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br><span class="line-number">31</span><br><span class="line-number">32</span><br><span class="line-number">33</span><br><span class="line-number">34</span><br><span class="line-number">35</span><br><span class="line-number">36</span><br><span class="line-number">37</span><br><span class="line-number">38</span><br><span class="line-number">39</span><br><span class="line-number">40</span><br><span class="line-number">41</span><br><span class="line-number">42</span><br><span class="line-number">43</span><br><span class="line-number">44</span><br><span class="line-number">45</span><br><span class="line-number">46</span><br><span class="line-number">47</span><br><span class="line-number">48</span><br><span class="line-number">49</span><br><span class="line-number">50</span><br><span class="line-number">51</span><br><span class="line-number">52</span><br><span class="line-number">53</span><br><span class="line-number">54</span><br><span class="line-number">55</span><br><span class="line-number">56</span><br><span class="line-number">57</span><br><span class="line-number">58</span><br><span class="line-number">59</span><br><span class="line-number">60</span><br><span class="line-number">61</span><br><span class="line-number">62</span><br><span class="line-number">63</span><br><span class="line-number">64</span><br><span class="line-number">65</span><br></div></div></li></ul> <h2 id="_1-11-数据统计"><a href="#_1-11-数据统计" class="header-anchor">#</a> 1.11. 数据统计</h2> <h3 id="_1-11-1-基于时间统计的折线图"><a href="#_1-11-1-基于时间统计的折线图" class="header-anchor">#</a> 1.11.1. 基于时间统计的折线图</h3> <ul><li><p>请求路径：reports/type/1</p></li> <li><p>请求方法：get</p></li> <li><p>响应数据</p></li> <li><p>需要合并的选项</p> <div class="language- line-numbers-mode"><pre class="language-text"><code>options: {
        title: {
          text: '用户来源'
        },
        tooltip: {
          trigger: 'axis',
          axisPointer: {
            type: 'cross',
            label: {
              backgroundColor: '#E9EEF3'
            }
          }
        },
        grid: {
          left: '3%',
          right: '4%',
          bottom: '3%',
          containLabel: true
        },
        xAxis: [
          {
            boundaryGap: false
          }
        ],
        yAxis: [
          {
            type: 'value'
          }
        ]
      }
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br></div></div></li></ul></div> <footer class="page-edit" style="display:none;"><!----> <!----></footer> <!----> <!----> <!----></main> <!----></div></div></div></div><div class="global-ui"><div class="back-to-ceiling" style="right:1rem;bottom:6rem;width:2.5rem;height:2.5rem;border-radius:.25rem;line-height:2.5rem;display:none;" data-v-c6073ba8 data-v-c6073ba8><svg t="1574745035067" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5404" class="icon" data-v-c6073ba8><path d="M526.60727968 10.90185116a27.675 27.675 0 0 0-29.21455937 0c-131.36607665 82.28402758-218.69155461 228.01873535-218.69155402 394.07834331a462.20625001 462.20625001 0 0 0 5.36959153 69.94390903c1.00431239 6.55289093-0.34802892 13.13561351-3.76865779 18.80351572-32.63518765 54.11355614-51.75690182 118.55860487-51.7569018 187.94566865a371.06718723 371.06718723 0 0 0 11.50484808 91.98906777c6.53300375 25.50556257 41.68394495 28.14064038 52.69160883 4.22606766 17.37162448-37.73630017 42.14135425-72.50938081 72.80769204-103.21549295 2.18761121 3.04276886 4.15646224 6.24463696 6.40373557 9.22774369a1871.4375 1871.4375 0 0 0 140.04691725 5.34970492 1866.36093723 1866.36093723 0 0 0 140.04691723-5.34970492c2.24727335-2.98310674 4.21612437-6.18497483 6.3937923-9.2178004 30.66633723 30.70611158 55.4360664 65.4791928 72.80769147 103.21549355 11.00766384 23.91457269 46.15860503 21.27949489 52.69160879-4.22606768a371.15156223 371.15156223 0 0 0 11.514792-91.99901164c0-69.36717486-19.13165746-133.82216804-51.75690182-187.92578088-3.42062944-5.66790279-4.76302748-12.26056868-3.76865837-18.80351632a462.20625001 462.20625001 0 0 0 5.36959269-69.943909c-0.00994388-166.08943902-87.32547796-311.81420293-218.6915546-394.09823051zM605.93803103 357.87693858a93.93749974 93.93749974 0 1 1-187.89594924 6.1e-7 93.93749974 93.93749974 0 0 1 187.89594924-6.1e-7z" p-id="5405" data-v-c6073ba8></path><path d="M429.50777625 765.63860547C429.50777625 803.39355007 466.44236686 1000.39046097 512.00932183 1000.39046097c45.56695499 0 82.4922232-197.00623328 82.5015456-234.7518555 0-37.75494459-36.9345906-68.35043303-82.4922232-68.34111062-45.57627738-0.00932239-82.52019037 30.59548842-82.51086798 68.34111062z" p-id="5406" data-v-c6073ba8></path></svg></div></div></div>
    <script src="/vuepress-demo/assets/js/app.46b6f644.js" defer></script><script src="/vuepress-demo/assets/js/3.426e1d24.js" defer></script><script src="/vuepress-demo/assets/js/1.bc0ebd1c.js" defer></script><script src="/vuepress-demo/assets/js/26.f517bc67.js" defer></script>
  </body>
</html>
